export default {
    onCreate() {
        console.info('AceApplication onCreate');
    },
    onDestroy() {
        console.info('AceApplication onDestroy');
    },
    getUserSignInUrl(){
        return this.globalData.IP + this.globalData.URL_USER_SIGN_IN;
    },
    getUserLoginUrl(name, password){
        return this.globalData.IP + this.globalData.URL_USER_LOGIN + "?userName=" + name +"&userPassword=" + password;
    },
    getUserSignUpUrl(){
        return this.globalData.IP + this.globalData.URL_USER_SIGN_UP
    },
    getUserRegisterUrl(){
        return this.globalData.IP + this.globalData.URL_USER_REGISTER
    },
    getUserUpdateImageUrl(){
        return this.globalData.IP + this.globalData.URL_USER_UPDATE_IMAGE
    },
    getUserUpdateNameUrl(){
        return this.globalData.IP + this.globalData.URL_USER_UPDATE_NAME
    },
    getUserQuestionUrl(){
        return this.globalData.IP + this.globalData.URL_USER_LOAD_QUESTION
    },
    getUserModify(){
        return this.globalData.IP + this.globalData.URL_USER_MODIFY
    },
    getItemSearchUrl(){
        return this.globalData.IP + this.globalData.URL_ITEM_SEARCH
    },
    getOrderCreateUrl(){
        return this.globalData.IP + this.globalData.URL_ORDER_CREATE
    },
    getOrderSearchUrl(){
        return this.globalData.IP + this.globalData.URL_ORDER_SEARCH
    },
    globalData: {
//        "IP": "http://hzh.vaiwan.com",//本地测试使用（部署服务器测试将此行注释）
                "IP": "http://106.12.150.68:8080",//服务器使用（本地测试时将此行注释）
        URL_USER_SIGN_IN: "/user/sign/in",
        URL_USER_LOGIN: "/user/login",
        URL_USER_SIGN_UP: "/user/sign/up",
        URL_USER_REGISTER: "/user/register",
        URL_USER_UPDATE_IMAGE: "/user/update/image",
        URL_USER_UPDATE_NAME: "/user/update/name",
        URL_USER_LOAD_QUESTION: "/user/question",
        URL_ITEM_SEARCH: "/item/search",
        URL_ORDER_CREATE: "/order/create",
        URL_ORDER_SEARCH: "/order/search",
        URL_USER_MODIFY: "/user/modifyPassword",
        user: {
            "userId": null,
            "userName": null,
            "userPassword": null,
            "userQuestion": null,
            "userAnswer": null,
            "userImagePath": null
        },
        jsonResult: {
            "code": null, "msg": null, "info": null
        },
        cartData: []
    }
};
